const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  entry: {
	  index: ['./src/scss/index.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/index.js'],
	  news: ['./src/scss/news.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/news.js'],
	  project: ['./src/scss/project.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/project.js'],
	  business: ['./src/scss/business.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/business.js'],
	  unit: ['./src/scss/unit.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/unit.js'],
	  group: ['./src/scss/group.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/group.js'],
	  contact: ['./src/scss/contact.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/contact.js'],
	  vote: ['./src/scss/vote.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/vote.js'],
	  link: ['./src/scss/link.scss', './src/scss/header.scss', './src/scss/footer.scss', './src/js/link.js']
    // index: ['./src/scss/index.scss', './src/js/index.js'],
    // login: ['./src/scss/login.scss', './src/js/login.js']
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: "./src/html/index.html",
      filename: "index.html",
      chunks: ["index"]
    }),
    new HtmlWebpackPlugin({
      template: "./src/html/news.html",
      filename: "news.html",
      chunks: ["news"]
    }),
	new HtmlWebpackPlugin({
	  template: "./src/html/project.html",
	  filename: "project.html",
	  chunks: ["project"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/business.html",
	  filename: "business.html",
	  chunks: ["business"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/unit.html",
	  filename: "unit.html",
	  chunks: ["unit"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/group.html",
	  filename: "group.html",
	  chunks: ["group"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/contact.html",
	  filename: "contact.html",
	  chunks: ["contact"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/vote.html",
	  filename: "vote.html",
	  chunks: ["vote"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/link.html",
	  filename: "link.html",
	  chunks: ["link"]
	})
  ]
}
